Release 10.1A: OpenEdge Data Management:
DataServer for Microsoft SQL Server
Forward and backward scrolling
A query is scrolling if you specify
SCROLLINGin theDEFINEQUERYstatement or if you define a browse for the query. You can use theREPOSITIONstatement to change your current position with the result set. For a non-scrolling query, the DataServer allows you to only move sequentially forward through the rows by using theFIRSTand options of theGETstatement. Scrolling basically means that the result set is cached on the client for backward and forward scrolling.With the DataServer, forward and backward scrolling works with an MS SQL Server just as it does with an OpenEdge database except when the data source fails to find a record. In the 4GL, the cursor position can change after a failed search; however, with the DataServer, a failed search does not affect the cursor. For example, if a cursor is positioned at
cust-num50and a request for the nextcustomerfrom an OpenEdge table fails, the cursor moves to the next sequential record beyondcust-num50. The same failed request from a data source leaves the cursor atcust-num50. Your DataServer applications should not assume a certain cursor position after a failed find.You can, however, still use the
AVAILABLEfunction to determine whether a record is available. TheAVAILABLEfunction behaves consistently whether it accesses an OpenEdge database or an MSS data source.Impact of MAX-ROWS
The
MAX-ROWSqualifier on a query determines the number of rows returned. TheMAX-ROWScalculation is applied before any sorting is applied to the query, causing the results to be random. Consider the following example:
When this example is run with the OpenEdge sports database, the first record return has
cust-num54, and the repeat loop displays othercust-numsin descending order from there. When this example is run with the sports database migrated to SQL Server, the first record returned hascust-num15, and the repeat loop displays values in descending order from there. This difference in results is a caused by theMAX-ROWSbeing applied prior to the sorting.
|
Copyright © 2005 Progress Software Corporation www.progress.com Voice: (781) 280-4000 Fax: (781) 280-4095 |